package com.graden.background.controller.sysmenufunction;


import com.graden.background.service.sysmenu.ISysMenuService;
import com.graden.background.common.utils.apiresult.AbstractApiResult;
import com.graden.background.repository.sysmenu.entity.SysMenuNode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  系统菜单功能权限前端控制器
 * </p>
 *
 * @author zjf
 * @since 2019-03-21
 */
@RestController
@RequestMapping("/function")
@Api(tags = {"系统菜单功能权限"})
public class SysMenuFunctionController {

	@Autowired
	ISysMenuService iSysMenuService;

	@GetMapping("/get")
	@ApiOperation(value = "查询菜单功能（树状）接口")
	public AbstractApiResult getAll() {

		List<SysMenuNode> sysMenuNodeList = iSysMenuService.getTreeFunctions();

		return AbstractApiResult.success(sysMenuNodeList);
	}
}
